package cst.a112gxl.TeacherPlatform112gxl.service;

import java.util.List;

import cst.a112gxl.TeacherPlatform112gxl.bean.ArticleBean;
import cst.a112gxl.TeacherPlatform112gxl.bean.CollectBean;
import cst.a112gxl.TeacherPlatform112gxl.bean.LoginBean;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/6/3/003.
 */

public interface ResService {
    @GET("api.php/login")
    Call<LoginBean> login(@Query("username") String username,
                          @Query("password") String password);

    @GET("api.php/reg")
    Call<String> reg(@Query("username") String username,
                           @Query("password") String password, @Query("tel") String tel);

    @GET("api.php/lists/mod/{mod}")
    Call<List<ArticleBean>> getArticleList(@Path("mod") String mod,
                                      @Query("page") int page,
                                      @Header("SessionID") String sessionID);
    @GET("api.php/get/mod/{mod}")
    Call<ArticleBean> getDetail(@Path("mod") String mod,
                                @Query("id") int id);

    @GET("api.php/listspecial/mod/{mod}")
    Call<List<ArticleBean>> getvideo2(@Path("mod")String mod,
                                           @Query("page") int page,
                                           @Header("SessionID") String sessionID
                                           );

    @GET("api.php/exists/mod/collect{mod}")

    Call<String> cexists(@Path("mod") String mod,
                         @Query("resid") int resid,
                         @Header("SessionID") String sessionID);

    @GET("api.php/create/mod/collect{mod}")
    Call<String> collect(@Path("mod")String mod,
                         @Query("resid") int resid,
                         @Header("SessionID") String sessionID);

    @GET("api.php/delete/mod/collect{mod}")
    Call<String> uncollect(@Path("mod")String mod,
                           @Query("resid") int resid,
                           @Header("SessionID") String sessionID);

    @GET("api.php/listmycollect/mod/collect{mod}")
    Call<List<CollectBean<ArticleBean>>> getCArticleList(@Path("mod")String mod,
                                                           @Query("page") int page,
                                                           @Header("SessionID") String sessionID);
    @GET("api.php/exists/mod/{mod}")
    Call<String> fexists(@Path("mod") String mod,
                        @Query("idolid") int idolid,
                        @Header("SessionID") String sessionID);

    @GET("api.php/create/mod/{mod}")
    Call<String> focus(@Query("mod") String mod,
                       @Query("idolid") int idolid,
                       @Header("SessionID") String SessionID);

    @GET("api.php/delete/mod/{mod}")
    Call<String> unfocus(@Path("mod") String mod,
                         @Query("idolid") int idolid,
                         @Header("SessionID") String sessionID);

    @GET("api.php/listmyfocus/mod/{mod}focus")
    Call<List<CollectBean<LoginBean>>> getFocusUserList(@Path("mod") String mod,
                                                       @Query("page") int page,
                                                       @Header("SessionID") String sessionID);
    @GET("api.php/lists/mod/{mod}")
    Call<List<ArticleBean>> getArticleList(@Path("mod")String mod,
                                           @Query("page") int page,
                                           @Header("SessionID") String sessionID,
                                           @Query("userid") int userid);

}
